<!-- 我的弹窗 -->

<template>
  <WebModal title="合同详情" noEdit>
    <WebShow>
      <ShowText label="合同名称" bind="projectName" />

      <EasyRow col2>
        <ShowText label="合同编号" bind="projectCode" />
        <ShowDict label="合同类型" bind="projectTypeId" :dict="DICT.TYPE" />
      </EasyRow>

      <EasyRow col2>
        <ShowText label="合同金额" bind="budget" suffix="元" />
      </EasyRow>

      <EasyRow col2>
        <ShowTree :label="`所属${CORE.MAP.ORGAN}`" bind="organizationId, organizationName" :dict="CORE.ORGAN.DICT" />
        <ShowText label="负责人" bind="principalUserName" />
      </EasyRow>

      <!-- 采购合同 -->
      <EasyRow v-if="one.projectTypeId === '1'" col2>
        <ShowDate label="签订日期" bind="signingTime" />
        <ShowDate label="验收日期" bind="checkedTime" />
        <ShowDate label="维保期限" bind="maintenanceEndTime" />
      </EasyRow>

      <!-- 服务合同 -->
      <EasyRow v-if="one.projectTypeId === '2'" col2>
        <ShowDate label="合同期限" bind="contractEndTime" />
      </EasyRow>

      <EasyRow col2>
        <ShowDict label="到期提醒" bind="expiredRemind" :dict="DICT.REMIND" />

        <ShowText label="提醒人">
          {{ one.remindUserName }}{{ one.remindPhone ? `　(${one.remindPhone})` : '' }}
        </ShowText>
      </EasyRow>

      <ShowFile label="合同附件" bind="projectFileDto" />
    </WebShow>
  </WebModal>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'MyModal',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb()],
}
</script>
